class FileAPIDemo
	{
	public static void readFile(File f1) throws IOException
		{
		char in[] = new char[50];
		int size = 0;
		FileReader fr = null;
		try
			{
			fr = new FileReader(f1);
			size = fr.read(in);
			System.out.println(size);
			for(char c : in)
				{
				System.out.println(c);
				}
			}
		catch(FileNotFoundException fnfe)
			{
			e.printStackTrace();	
			}
		fr.close();
		}
	
	/*
	public static boolean writeSomething(File f1, String data)
		{
		FileWriter fw = null;
		
		}
	*/
	
	public static void main(String args[])
		{
		readFile("read.txt");
		}
	}